package com.manyiaby.view.viewutils;

import android.app.Activity;
import android.content.Context;

import com.manyiaby.R;

/**
 * 参一针对将要进入的Activity，参二将要消失的Activity
 */
public class ActivityOpenAnimation {

    /**
     * 淡入淡出
     *
     * @param context
     */
    public static void Fade_In_Out(Context context) {
        ((Activity) context).overridePendingTransition(R.anim.fade_in,
                R.anim.fade_out);
    }

    /**
     * 上升 下降
     *
     * @param context
     */
    public static void zoomac_In_Out(Context context) {
        ((Activity) context).overridePendingTransition(R.anim.zoomac_in,
                R.anim.zoomac_out);
    }

    /**
     * 右向左滑
     *
     * @param context
     */
    public static void push_In_Out(Context context) {
        ((Activity) context).overridePendingTransition(R.anim.push_left_in,
                R.anim.push_left_out);// 往左推
    }

    /**
     * 左向右滑
     *
     * @param context
     */
    public static void push_In_Close(Context context) {
        ((Activity) context).overridePendingTransition(R.anim.push_right_in,
                R.anim.push_right_out);// 往右推
    }


    /**
     * 从下往上
     *
     * @param context
     */
    public static void lower_In_upper(Context context) {
        ((Activity) context).overridePendingTransition(R.anim.lower_to_upper,
                0);
    }

    /**
     * 从上往下
     *
     * @param context
     */
    public static void upper_In_lower(Context context) {
        ((Activity) context).overridePendingTransition(0, R.anim.upper_to_lower);
    }


}
